﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MyAlbum.Model;
using MyAlbum.Data;
using MyAlbum.Utility;

namespace MyAlbum.Services
{
    public class ConfigService : IDataService<Config>
    {
        private IRepository<Config> _repository;
        public ConfigService(IRepository<Config> configRepository)
        {
            if (configRepository == null)
            {
                throw new ArgumentNullException("configRepository");
            }
            this._repository = configRepository;
        }
        #region IDataService<Config> Members

        public List<Config> GetItems()
        {
            return this._repository.GetItems();
        }

   
        public void DeleteItem(Config item)
        {
            this._repository.DeleteItem(item);
        }

        public void UpdateItem(Config item, IValidationSummary validationSummary)
        {
            this._repository.UpdateItem(item);
        }

     


        public Config GetItemById(string id)
        {
            return this._repository.GetItemById(id);
        }

     

        public void AddItem(Config item, MyAlbum.Utility.IValidationSummary summary)
        {
            this._repository.AddItem(item);
        }

        #endregion
    }
}
